<%@ page import="java.util.Date" %>
<%@ page import="java.text.SimpleDateFormat" %><%--
  Created by IntelliJ IDEA.
  User: win
  Date: 2020/10/14
  Time: 22:20
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>response内置对象的使用</title>
</head>
<body>
<%
    //表示每隔一秒刷新一次
    response.addHeader("refresh","1");
    //获取当前系统时间
    Date date = new Date();
    SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
    String format = simpleDateFormat.format(date);
%>
<h1> <%= format%> </h1>
</body>
</html>
